package com.hs.hlw.credit.system.common.enumeration;

/**
 * FormFieldInputType
 * @author zhb
 * @date 2018/11/20
 */
public enum FormFieldInputType {
    TYPE_1((short) 1, "文本选择"),
    TYPE_2((short) 2, "数值输入"),
    TYPE_3((short) 3, "维表选择"),
    TYPE_4((short) 4, "日期选择");

    public Short code;
    public String desc;

    FormFieldInputType(Short code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    /**
     * 判断是否存在
     * @param code
     * @return
     */
    public static boolean contains(Short code){
        for (FormFieldInputType enu : FormFieldInputType.values()) {
            if (enu.code.equals(code)) {
                return true;
            }
        }
        return false;
    }
}